import { useBoolean } from 'ahooks';
import { Skeleton } from 'antd';
const IframePage = () => {
	const [loading, { setFalse: endLoading }] = useBoolean(true);

	const url = window.location.href.split('#')[1];
	return (
		<>
			{loading && <Skeleton active />}
			{url && (
				<div className={loading ? 'h-0' : 'h-full'}>
					<iframe
						title="iframePage"
						className="size-full"
						id="iframePage"
						src={url}
						onLoad={endLoading}
					/>
				</div>
			)}
		</>
	);
};

export default IframePage;
